/*
 * 输入框组件
 */
const template = `
<input v-model="content" type="text" placeholder="请输入内容" >
`;
Vue.component("my-input", {
  template,
  props: ["value"],
  // TODO 请在此继续完成该组件的代码编写
  data() {
    return {
      content: "",
    };
  },
  watch: {
    content(val) {
      this.$emit("input", val);
    },
    value(val) {
      this.content !== val && (this.content = val);
    },
  },
  mounted() {
    this.content = this.value;
  },
  methods: {},
});
